
<div class="negative">
	<div class="negative_resize">
		<div class="nav-left nav-main" id="nav-main">
			<ul>
				<li><a href="#" rel="Dashboard">Dashboard</a></li>
				<li><a href="#" rel="UserManager">User Manager</a></li>
				<li><a href="#" rel="Questions">Questions</a></li>
				<li><a href="#" rel="Exams">Exams</a></li>
				<li><a href="#" rel="Setting">Setting</a></li>
			</ul>
		</div>
		<div class="nav-right">
			<ul>
				<li>
					<img src="../img/icons/icon_myaccount_12x12.png" height="12px" width="12px" />
					<a href="#" class="showhide-account myaccount">My Account</a>
				</li>
				<li>
					<img src="../img/icons/icon_logout_12x12.png" height="12px" width="12px" />
					<?php echo $this->Html->link(__("Sign Out",true),"/logout", array('class' => 'logout')) ?>
				</li>
			</ul>
			<!--  start account-content -->	
			<div class="account-content">
				<div class="account-drop-inner">
					<?php echo $this->Ajax->link(__("Profile",true),"/myprofile/", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET', 'class' => 'acc-profile')) ?>
					<div class="acc-line">&nbsp;</div>
					<?php echo $this->Ajax->link(__("Edit Profile",true),"/editMyAccount/", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET', 'class'=>'acc-editprofile')) ?>
					<div class="acc-line">&nbsp;</div>
					<?php echo $this->Ajax->link(__("Change Password",true),"/changePassword", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET','class' => 'acc-changepassword')) ?>
				</div>
			</div>
			<!--  end account-content -->
		</div>
	</div>
</div>
<div class="negative" id="subtopmenu">
	<div class="sub negative_resize">
		<div class="nav-left">
			<div id="Dashboard" class="tabcontent">
				<ul>
					<li>
						<?php echo $this->Ajax->link(__("Dashboard",true),"/dashboard", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET')); ?>
					</li>
				</ul>
			</div>
			<div id="UserManager" class="tabcontent">
				<ul>
					<?php   if ($this->UserAuth->getGroupName()=='Admin') { ?>
					<li><?php echo $this->Ajax->link(__("Dashboard",true),"/dashboard", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET')); ?></li>
					<li><?php echo $this->Ajax->link(__("All Users",true),"/allUsers", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET')) ?></li>
					<li><?php echo $this->Ajax->link(__("Add Users",true),"/addUser", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET')) ?></li>
					<li><?php echo $this->Ajax->link(__("All Groups",true),"/allGroups", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET')) ?></li>
					<li><?php echo $this->Ajax->link(__("Add Group",true),"/addGroup", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET')) ?></li>
					<li><?php echo $this->Ajax->link(__("Permissions",true),"/permissions", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET')) ?></li>
					<?php   }?>
				</ul>
			</div>
			<div id="Questions" class="tabcontent">
				<ul>
					<li><?php echo $this->Ajax->link("All Questions","/Questions/index", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET')) ?></li>
					<li><?php echo $this->Ajax->link("Add Question","/Questions/add", array('update' => 'MainContent','indicator' => 'loading', 'type' => 'GET')) ?></li>
				</ul>
			</div>
			<div id="Exams" class="tabcontent">
				<ul>
					<li><a href="#">All Exams</a></li>
				</ul>
			</div>
			<div id="Setting" class="tabcontent">
				<ul>
					<li><a href="#">Config</a></li>
				</ul>
			</div>
		</div>
		<?php echo $this->Loading->load('loading'); ?>
		<div style="clear:both"></div>
	</div>
</div>
<script>
	//SYNTAX: ddtabmenu.definemenu("tab_menu_id", integer OR "auto")
	ddtabmenu.definemenu("nav-main", 0); //initialize Tab Menu with ID "ddtabs1" and select 1st tab by default
	
	$(document).ready(function(){

		$('.topmenu .negative .nav-main ul li a').click(function(){
			
		});
		$('.topmenu .negative .sub ul li a').click(function(){
			$('.topmenu .negative .sub ul li a').each(function(){
				 $(this).removeClass("current");
			});
			$(this).addClass('current');
			ddtabmenu.showsubmenu("",this);
		});		
		$(".showhide-account").click(function () {
	        $(".account-content").slideToggle("fast");
	        $(this).toggleClass("active");
	        return false;
	    });
	});
	$(document).bind("click", function (e) {
	    if (e.target.id != $(".showhide-account").attr("class")) $(".account-content").slideUp();
	});
</script>